package org.example.maven.pojo.department.list;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class DepartmentSelect {
    private String label;
    private String value;
    List<DepartmentSelect> children;

    public DepartmentSelect(String label,String value){
        this.value=value;
        this.label=label;
        this.children=new ArrayList<>();
    }

    public void addChildren(DepartmentSelect departmentSelect){
        this.children.add(departmentSelect);
    }
}
